//
//  CZTempViewController.swift
//  微博
//
//  Created by 范承志 on 16/6/11.
//  Copyright © 2016年 fanchengzhi. All rights reserved.
//

import UIKit

class CZTempViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        setupUI()
    }
    
    // MARK: - 监听事件
    @objc private func pushClick(){
        let tempVc = CZTempViewController()
        navigationController?.pushViewController(tempVc, animated: true)
    }
    
    //    @objc private func backClick(){
    //        _ = navigationController?.popViewController(animated: true)
    //    }
    //
    // MARK: - 设置视图
    private func setupUI(){
        view.backgroundColor = UIColor.white
        setupNav()
    }
    
    // MARK: - 设置导航
    private func setupNav(){
        //        navigationItem.leftBarButtonItem = UIBarButtonItem(setHighlightedImgName: "navigationbar_back_withtext", title: "返回", target:  self, action: #selector(backClick))
        navigationItem.rightBarButtonItem = UIBarButtonItem(highlightedImgName: nil, title: "PUSH", target: self, action: #selector(pushClick))
        navigationItem.title = "是\(navigationController?.childViewControllers.count ?? 0)个控制器"
    }

}
